<?php

namespace App\Http\Controllers;

use App\Models\UserTicket;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;

class DashboardController extends Controller
{
    //
    public function index(){

        $users_id = Auth::user()->id;

//        $list = DB::table('user_tickets')->where(['users_id'=>$users_id])->get();
        $list = UserTicket::where(['users_id'=>$users_id])->get();

        return view('dashboard', ['items'=>$list]);
    }
}
